package casa.depesos.app.com.http.req;


import java.util.Map;

import casa.depesos.app.com.http.HttpReq;
import casa.depesos.app.com.http.ReqCallback;
import casa.depesos.app.com.http.bean.GetCodeBean;
import casa.depesos.app.com.http.data.Work;
import casa.depesos.app.com.http.parser.GetCodeParser;
import casa.depesos.app.com.utils.Constant;

public class SaveWorkReq implements HttpReq<GetCodeBean> {

    Work map;

    public SaveWorkReq(Work map) {
        this.map = map;
    }

    @Override
    public Map getBody() {
        Map tmp = HttpReq.super.getBody();
        tmp.put("jtype", map.type);
        tmp.put("mclass", map.job);
        tmp.put("employmentYears", map.exp);
        tmp.put("infunds", map.income);
        tmp.put("decision", map.option);
        tmp.put("remak", "null");
        tmp.put("reqnum", Constant.getApplyId());

        return tmp;
    }

    @Override
    public void req(ReqCallback callback) {//   /app/cust/saveWork
        req("/app/professionalData/storeOccupationalDetails", new GetCodeParser(), callback);
    }
}
